package com.kgc.scd.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.kgc.scd.bean.Order;
import com.kgc.scd.bean.OrderVO;
import com.kgc.scd.util.PageSupport;
import com.kgc.scd.util.RequestResult;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;
import java.util.Map;

/**
 * @author: WangKuoKuo
 * @create: 2022-06-14 15:39
 * @description:
 **/
@FeignClient("blmall-server-wkk")
// @RequestMapping("/orderCenter")
public interface OrderServiceFeign {

    // 查询订单详情
    @GetMapping("/queryOrderList")
    RequestResult<List<OrderVO>> queryOrderList(@RequestParam("orderId") String orderId);

    // 删除订单,order_state等于3才可以删
    @PostMapping("/delOderByOrderId")
    RequestResult<Map<String, Object>> delOderByOrderId(@RequestParam("orderId") String orderId);

    // 根据订单状态查询订单
    @GetMapping("/queryOderByOrderState")
    RequestResult<PageSupport<Order>> queryOderByOrderState(@RequestParam("userId") String userId,
                                                           @RequestParam(value = "orderState", required = false) Integer orderState,
                                                           @RequestParam("pageSize") Integer pageSize,
                                                           @RequestParam("pageNo") Integer pageNo,
                                                            @RequestParam("order")Integer order);

}

